package cn.tedu.clyback.role.mapper;


import cn.tedu.clyback.role.pojo.dto.InsertPermissionParam;
import cn.tedu.clyback.role.pojo.dto.RoleSelectParam;
import cn.tedu.clyback.role.pojo.entity.Role;
import cn.tedu.clyback.role.pojo.vo.RoleVO;
import cn.tedu.clyback.role.pojo.vo.SelectUserByRoleIdVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleMapper {

    List<RoleVO> selectRole(RoleSelectParam roleSelectParam);

    void insert(Role role);

    void updateStatus(Role role);

    void deleteRole(Integer id);

    void update(Role role);

    List<SelectUserByRoleIdVo> selectUserByRoleId(Integer roleId);

    void deleteUserRole(@Param(value = "roleId")Integer roleId,@Param(value = "userId")  Long userId);

    List<SelectUserByRoleIdVo> selectUser(Integer roleId);

    void addUserRole(@Param(value = "roleId") Integer roleId, @Param(value = "userId") Long userId);

    List<RoleVO> selectUserRole(Long userId);

    void removeUserRole(@Param(value = "roleId") Integer roleId, @Param(value = "userId") Long userId);

    List<RoleVO> selectUnAddUserRole(Long userId);
}